<% include '/WEB-INF/includes/header.gtpl' %>

<div align = "center">

	<%
		request.userList.each { usr -> 
	%>
	
	<table>
	<tr>
	<td>姓名</td>
	<td>${usr.name}</td>
	<td><a href="/deleteuser/${usr.name}">删除</a></td>
	</tr>
	<tr>
	<td>邮箱</td>
	<td>${usr.email}</td>
	<td><a href="/edituser/${usr.name}">修改</a></td>
	</tr>
	<tr>
	<td>别名</td>
	<td>${usr.alias}</td>
	</tr>
	</table>
	<hr />
	
	<% } %>
	
	<%
		def page = request.page as Integer
	%>
	<div align="left">
	<%
		if(request.userList.size() == 5){
	%>
	<%= page == 1 ? "<a href='/userlist/${page+1}'>下一页</a>" : "<a href='/userlist/${page-1}'>上一页</a>|<a href='/userlist/${page+1}'>下一页</a>" %>
	<%
		}else{
	%>
	<%= page == 1 ? "" : "<a href='/userlist/${page-1}'>上一页</a>" %>
	<%		
		}
	%>
	</div>
	
</div>

<% include '/WEB-INF/includes/footer.gtpl' %>